namespace GeoAzure.Core
{
    internal struct IndexWalk<T>
        where T : class
    {
        private readonly TreeNode<T> _node;
        private readonly long _expectedLsn;

        public IndexWalk(IndexEntry<T> entry)
        {
            _node = entry.Node;
            _expectedLsn = entry.NodeLsn;
        }

        public IndexWalk(TreeNode<T> treeNode)
        {
            _node = treeNode;
            _expectedLsn = treeNode.Lsn;
        }

        public long ExpectedLsn
        {
            get { return _expectedLsn; }
        }

        public TreeNode<T> Node
        {
            get { return _node; }
        }
    }
}